feat(i18n): implement Thai localization and extract hardcoded strings#795
feat(i18n): implement Thai localization and extract hardcoded strings#795ArthitDev wants to merge 8 commits intodifferent-ai:devfrom
Conversation
- Replaced hardcoded UI text and error messages with translation helpers in app.tsx, pages, and components. - Added new translation keys to English (en.ts) and Chinese (zh.ts) locales. - Introduced complete Thai translation dictionary in th.ts. - Setup i18n structure to support future localization updates.
- Replaced hardcoded UI text and error messages with translation helpers in app.tsx, pages, and components. - Added new translation keys to English (en.ts) and Chinese (zh.ts) locales. - Introduced complete Thai translation dictionary in th.ts. - Setup i18n structure to support future localization updates. ## Summary Implemented comprehensive Thai (th) localization for the OpenWork UI. Extracted all hardcoded English strings from components and pages into translation keys. Added complete Thai translation dictionary covering all UI elements, status messages, and user-facing text. ## Why To support Thai-speaking users and establish a scalable i18n foundation for future language additions. ## Issue - Closes # (add issue number if applicable) ## Scope - Thai localization (th.ts) - English locale updates (en.ts) - Component translation integration - Test script cross-platform fix (Windows) ## Out of scope - RTL language support - Dynamic language switching without reload - Third-party service localization ## Testing ### Ran - pnpm build - pnpm --filter @different-ai/openwork-ui typecheck - node scripts/e2e.mjs --dir=. ### Result - pass: All tests passed - Build successful with no i18n-related errors ## CI status - pass: Build and typecheck passing - code-related failures: None - external/env/auth blockers: None ## Manual verification 1. Verified Thai translations display correctly in UI 2. Tested e2e suite passes with opencode binary 3. Confirmed no console errors from missing translation keys ## Evidence N/A (localization feature) ## Risk Low - additive changes only, no breaking changes to existing functionality. ## Rollback - Revert commit e1da81c - Remove th.ts locale file - Restore hardcoded strings if needed
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@Arthit-EPIT is attempting to deploy a commit to the 0 Finance Team on Vercel. A member of the Team first needs to authorize it. |
|
The following comment was made by an LLM, it may be inaccurate: |
Fix session loss during workspace switches and improve sidebar handling
…/openwork-th into feat/localization-thai
|
Conflicts, please resolve |
- Resolve all 8 file conflicts from localization-thai merge - Keep dev changes: sandbox progress props, soul mode removal - Adopt localization: tr() calls throughout, locale-aware templates - Add Thai locale (th.ts), remove soul.tsx (deleted in dev) - Fix TypeScript: add isRemoteWorkspace prop to ExtensionsView/McpView
fix conflict
It's done, sir. |
|
Please merge so I can update my Japanese PR for it as well 🙇♂️ |
I was planning to merge it anyway, but since the current focus is on fixing the core features, the language part was skipped for now. So I’ve been resolving the conflicts and notifying whenever they occur. I’d still prefer adding proper language support. I’ve already refactored the hard-coded parts, so if we want to support more languages later, it should only require adding translations without touching the code. That said, if the decision is to keep hard-coding after resolving conflicts, I respect the team's decision. Thanks. |
|
@johnnyshields merged yours last night 🇯🇵 🫡 @ArthitDev I missed this one. We're doing a significant change on the infra today but I'll look into this again tomorrow morning. The browser setup in thai is really cool! We've deprecated the soul part but we might get back into it in a week or two. |
- Convert 20 component files from hardcoded strings to t() calls - Add parameterized t() function support for dynamic values - Expand en.ts from ~838 to ~1720 translation keys - Add Thai (th) locale with complete translations - Update zh and vi translations to match all new keys - Add Thai to language selector in i18n/index.ts Resolves PR different-ai#795 conflicts against dev branch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@jcllobet |
- JA: add 704 missing keys (1542 total) - ZH: add 771 missing keys (1549 total) - TH: create full Thai locale (1542 keys, adapted from PR different-ai#795) - pt-BR: add 704 missing keys (1543 total) - VI: add 727 missing keys (1543 total) - Register Thai locale in i18n/index.ts All locales now have complete coverage of en.ts keys. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
JA: fix 42 workspace/worker terms, 8 spacing issues, 19 ellipsis fixes ZH: rebrand 50+ MCP→Apps strings, standardize 你/您, remove 6 stale keys TH: translate 200+ untranslated strings, fix term consistency, port PR different-ai#795 hero text pt-BR: fix gender agreement, align plural placeholders VI: fix 70+ workspace/worker terminology, verify diacritics All locales now have 1542 keys matching en.ts exactly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…cales (#1339) * feat(i18n): complete translations for all 6 locales - JA: add 704 missing keys (1542 total) - ZH: add 771 missing keys (1549 total) - TH: create full Thai locale (1542 keys, adapted from PR #795) - pt-BR: add 704 missing keys (1543 total) - VI: add 727 missing keys (1543 total) - Register Thai locale in i18n/index.ts All locales now have complete coverage of en.ts keys. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(i18n): review and polish all locale translations JA: fix 42 workspace/worker terms, 8 spacing issues, 19 ellipsis fixes ZH: rebrand 50+ MCP→Apps strings, standardize 你/您, remove 6 stale keys TH: translate 200+ untranslated strings, fix term consistency, port PR #795 hero text pt-BR: fix gender agreement, align plural placeholders VI: fix 70+ workspace/worker terminology, verify diacritics All locales now have 1542 keys matching en.ts exactly. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(i18n): final holistic review pass — 8 precision fixes JA: fix token label/hint to preserve collaborator/owner distinction ZH: standardize sandbox terminology (沙盒→沙箱, 3 keys) TH: fix den.signing_in to convey "finishing" not just "signing in" pt-BR: fix matching context, curated qualifier, missing verb (3 keys) VI: fix reload vs restart consistency in mcp.auth section All locales verified: key parity, placeholders, term consistency, tone, punctuation, and meaning preservation confirmed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix(i18n/ja): use 済み for status labels, しました for toasts Short status labels/badges use noun+済み (completed state): - common.copied: コピー済み - message_list.tool_updated_file: {file}を更新済み - message_list.tool_updated_file_fallback: ファイル更新済み - skills.install_complete: インストール済み Toast/notification messages keep しました (past action). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@jcllobet this PR can now be closed. |
Replaced hardcoded UI text and error messages with translation helpers in app.tsx, pages, and components.
Added new translation keys to English (en.ts) and Chinese (zh.ts) locales.
Introduced complete Thai translation dictionary in th.ts.
Setup i18n structure to support future localization updates.
Summary
Implemented comprehensive Thai (th) localization for the OpenWork UI. Extracted all hardcoded English strings from components and pages into translation
keys. Added complete Thai translation dictionary covering all UI elements, status messages, and user-facing text.
Why
To support Thai-speaking users and establish a scalable i18n foundation for future language additions.
Issue
Scope
Out of scope
Testing
Ran
Result
CI status
Manual verification
Evidence
N/A (localization feature)
Risk
Low - additive changes only, no breaking changes to existing functionality.
Rollback
New files